package controllers;

import java.util.List;

import org.apache.commons.lang.StringUtils;

import services.DrCaseSortService;
import vos.Node;
import vos.ResultVo;
import vos.ReturnCode;

/**
 * 案件种类控制类
 * @author wangshaoming
 *
 */
public class DrCaseSortController extends BaseController {
	/**
	 * 获取下拉框
	 */
	public static void getCombobox(){
		List<Node> nodes=DrCaseSortService.getCombobox();
		renderJSON(nodes);
	}
	/**
	 * 根据sortid获取模板
	 * @param sortid
	 */
	public static void getTempletBySortId(String sortid){
		if(StringUtils.isEmpty(sortid)){
			renderRespondJson(ReturnCode.ErrorCode,"请选择案件类别");
		}
		String temp=DrCaseSortService.getTempletBySortId(sortid);
		ResultVo vo=new ResultVo(ReturnCode.SuccessCode,"获取成功",temp);
		renderJSON(vo);
	}
}
